package com.sikaryofficial.backend.config;

import com.github.houbb.sensitive.word.api.IWordDeny;
import com.sikaryofficial.backend.utils.HiSMKFileUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 拒绝出现的数据-返回的内容被当做是敏感词
 * @date : 2024/03/11 10:23
 */
@Component
public class MyWordDeny implements IWordDeny {
    @Value("${sensitive_word.deny_path}")
    private String denyPath;
    @Override
    public List<String> deny() {
        return  HiSMKFileUtil.readExternalTxtFile(denyPath);
    }
}
